Skip to content

Conversation

tjkuson
Copy link
Contributor

@tjkuson tjkuson commented Aug 9, 2025

Automatically reinstates the event loop on the main thread when needed.

The coverage report suggests the patch is uncovered, but I think this is due to limitations of measuring coverage across processes.

Fixes #1177

Note: this is a work-in-progress proposal based on my understanding of the issue. If the maintainers prefer a different approach or consider the issue invalid, I’m happy to adjust or close this PR.

@codecov-commenter
Copy link

codecov-commenter commented Aug 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.53%. Comparing base (e83ddae) to head (f5739a6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1180   +/-   ##
=======================================
  Coverage   90.53%   90.53%           
=======================================
  Files           2        2           
  Lines         412      412           
  Branches       45       45           
=======================================
  Hits          373      373           
  Misses         30       30           
  Partials        9        9           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tjkuson tjkuson force-pushed the mainthread-fix branch 3 times, most recently from 5ff08a0 to bb8628a Compare August 9, 2025 15:41
Copy link
Contributor

@seifertm seifertm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tjkuson In the issue related to this PR, you mentioned you had a local patch that satisfies the edge case I mentioned. It sounded really promising and I'd appreciate if you could share it!

@tjkuson tjkuson force-pushed the mainthread-fix branch 4 times, most recently from e9b9fb9 to ac9e0d6 Compare August 24, 2025 18:37
@tjkuson
Copy link
Contributor Author

tjkuson commented Aug 24, 2025

@seifertm I've pushed the patch that satisfies the edge-case you mentioned (though the PR is still quite proof-of-concept).

@seifertm
Copy link
Contributor

seifertm commented Sep 8, 2025

@tjkuson I continued working on your PR and found that the issue has resolved itself as part of a recent merge.

Using your tests, I did a git bisect to identify the change leading to the bug fix, but I didn't really succeed and didn't want to invest further time in it.

I think the new tests are extremely helpful on its own and I'd like to merge them along with your cleanup and changelog entries.

If it's not too much work, I'd like to backport the fix and do a patch release for v1.1 (given I identify the fixing commit) and the tests will help with that.

@seifertm seifertm marked this pull request as ready for review September 8, 2025 11:02
@tjkuson
Copy link
Contributor Author

tjkuson commented Sep 8, 2025

@seifertm Thank you, that's great! Glad to hear the other stuff in the PR is helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RuntimeError when the event loop is unset between tests
3 participants